﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Presentation/master.Master" AutoEventWireup="true" CodeBehind="AddItemToVoucherUI.aspx.cs" Inherits="Staionery_Inventory.Presentation.StockCard.AddItemToVoucherUI__Reload_" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="col-md-12">
            <%-- Title--%>
            <div class="form-group">
                <div class="col-md-3"></div>
                <label class="col-md-12" style="font-size:xx-large">Submit Adjustment Voucher</label>
            </div>

            <%-- GetItem --%>
            <div class="form-group">
                <%-- lbl --%>
                <label id="lblGetItem" class="control-label col-md-3">Get Item: </label>
                <%-- rbt --%>
                <div class="col-md-2">
                    <asp:RadioButton ID="rbtByItemCode" runat="server" Text="Item Code" GroupName="rbtGetItem" Checked="true"/>  <p></p>
                    <asp:RadioButton ID="rbtByBinNo" runat="server" Text="Bin No" GroupName="rbtGetItem" />
                </div>
                <%-- txt --%>
                <div class="col-md-2">
                    <asp:TextBox ID="txtGetItem" runat="server" CssClass="form-control"  onclick="clearValidation()"></asp:TextBox>
                </div>
                <%-- btn --%>
                <div class="col-md-2">
                    <asp:Button ID="btnGetItem" runat="server" Text="Get Item" 
                        CssClass="btn btn-success" onclick="btnGetItem_Click"/>
                </div>
                <%-- btn --%>
                <div class="col-md-2">
                    <asp:Button ID="btnSearch" runat="server" Text="Search" 
                        CssClass="btn btn-primary" onclick="btnSearch_Click"/>
                </div>
            </div>

            <hr/>
            <%-- BinNo --%>
            <div class="form-group">
                <%-- lbl --%>
                <label class="control-label col-md-3">Bin No: </label>
                <%-- lbl --%>
                <asp:Label ID="lblBinNo" runat="server" Text="" class="col-md-2 control-label"></asp:Label>
            </div>

            <%-- ItemCode --%>
            <div class="form-group">
                <%-- lbl --%>
                <label class="control-label col-md-3">Item Code: </label>
                <%-- lbl --%>
                <asp:Label ID="lblItemID" runat="server" Text="" class="col-md-2 control-label"></asp:Label>
            </div>

            <%-- ItemName --%>
            <div class="form-group">
                <%-- lbl --%>
                <label class="control-label col-md-3">Item Description: </label>
                <%-- lbl --%>
                <asp:Label ID="lblName" runat="server" Text="" class="col-md-2 control-label"></asp:Label>
            </div>

            <%-- QtyLeft --%>
            <div class="form-group">
                <%-- lbl --%>
                <label class="control-label col-md-3">Quantity in Stock: </label>
                <%-- lbl --%>
                <asp:Label ID="lblQtyLeft" runat="server" Text="" class="col-md-2 control-label"></asp:Label>
            </div>

            <%-- QtyAdjusted --%>
            <div class="form-group">
                <%-- lbl --%>
                <label class="control-label col-md-3">Quantity Adjusted: </label>
                <%-- txt --%>
                <div class="col-md-2" onkeypress="return keypress(event)">
                    <asp:TextBox ID="txtQtyAdjusted" runat="server" CssClass="form-control" 
                        ReadOnly="True" onclick="clearValidation()" required></asp:TextBox>
                </div>
            </div>

            <%-- Reason --%>
            <div class="form-group">
                <%-- lbl --%>
                <label class="control-label col-md-3">Reason: </label>
                <%-- ddl --%>
                <div class="col-md-3">
                    <asp:DropDownList ID="ddlReason" runat="server" CssClass="form-control" 
                        Enabled="False" onclick="clearValidation()">
                        <asp:ListItem Selected="True" Value="Select a Reason">Select a Reason</asp:ListItem>
                        <asp:ListItem>Bonus</asp:ListItem>
                        <asp:ListItem>Broken</asp:ListItem>
                        <asp:ListItem>Expired</asp:ListItem>
                        <asp:ListItem>Missing</asp:ListItem>
                        <asp:ListItem>Others</asp:ListItem>
                    </asp:DropDownList>
                </div>
            </div>

            <%-- button group --%>
            <div class="form-group">
                <div class="col-md-3"></div>
                <div class="col-md-3">
                    <asp:Button class="btn btn-primary btn-lg" ID="btnCreate" runat="server" 
                        Text="Submit" style="width:150px" onclick="btnCreate_Click" />
                </div>
            </div>
       
            <%-- message label --%>
            <div class="form-group">
                <asp:Label ID="lblMessage" runat="server" class="control-label col-md-8" 
                    ClientIDMode="Static"></asp:Label>
            </div>

    </div>
    <script type="text/javascript">
           function clearValidation() {
               document.getElementById('<%=lblMessage.ClientID %>').innerHTML = '';
           }
    </script>
</asp:Content>
